#ifndef FRAMEBUFFER_H_
#define FRAMEBUFFER_H_

struct subpixel {
	float r, g, b;
	float depth;
	float nx, ny, nz;
	unsigned int mat_id;
};

struct pixel {
	float r, g, b;
	unsigned int num_subpix;
	struct subpixel *subpix;
};

struct framebuffer {
	int width, height;
	struct pixel pix[1];
} *fb;

struct framebuffer *alloc_framebuffer(void);
void free_framebuffer(struct framebuffer *fb);


#endif	/* FRAMEBUFFER_H_ */
